package com.zqh.myfmmall.rowbeans.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单项/快照 
 * </p>
 *
 * @author chrimer
 * @since 2022-01-20
 */
@Data
public class OrderItem {

    private static final long serialVersionUID = 1L;

    private String itemId;

    private String orderId;

    private String productId;

    private String productName;

    private String productImg;

    private String skuId;

    private String skuName;

    private String skuProps;

    private BigDecimal productPrice;

    private Integer buyCounts;

    private BigDecimal totalAmount;

    private LocalDateTime basketDate;

//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime buyTime;

    private Integer isComment;


}
